package cn.tedu.spring.di;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Repository;

@SuppressWarnings("all")
@PropertySource("classpath:application.properties.yml")
@Repository
public class UserDao {

    @Value("${spring.datasource.url}")
    private String url;
    @Value("${spring.datasource.username=root}")
    private String username;
    @Value("${spring.datasource.password=root}")
    private String password;

    public void setPassword(String password) {
        this.password = password;
    }

    @Override
    public String toString() {
        return "UserDao{" +
                "url='" + url + '\'' +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' +
                '}';
    }
}